package birdsong.dummy;

import java.io.Serializable;

import birdsong.comm.ServerSideMessage;

//A message contains a type (enum), a payload (String), * and the client's nickname (String). 
public class ServerSideMessageDummy implements ServerSideMessage, Serializable {
    private static final long serialVersionUID = 1L;
    private Type tipo;
    private String payload;
    private String clientNickname;

    /**
     * Creates a ServerSideMessageDummy, containing the type of message it is
     * (type), the payload (String), and the clients' nickname (string).
     * 
     * @param tipo
     * @param payload
     * @param clientNickname
     */

    public ServerSideMessageDummy(Type tipo, String payload, String clientNickname) {
	this.tipo = tipo;
	this.payload = payload;
	this.clientNickname = clientNickname;
    }

    /**
     * Gets the type of message a ServerSideMessageDummy has.
     */

    @Override
    public Type getType() {
	return tipo;
    }

    /**
     * Gets the payload in a ServerSideMessageDummy.
     */

    @Override
    public String getPayload() {
	return payload;
    }

    /**
     * Gets the clients' nickname in a ServerSideMessageDummy.
     */

    @Override
    public String getClientNickname() {
	return clientNickname;
    }

}
